import { createRouter, createWebHashHistory } from "vue-router"

let routes = [
    {
        path:"/test",
        component: () => import("../views/test.vue")
    },
    {
        path:"/",
        component: () => import("../views/HomePage.vue")
    },
    {
        path:"/detail",
        component: () => import("../views/Detail.vue")
    },
    {
        path:"/login",
        component: () => import("../views/Login.vue")
    },
    {
        path:"/dashboard",
        component: () => import("../views/dashBoard/DashBoard.vue"),
        children: [
            {
                path: "/dashboard/category",
                component: () => import("../views/dashBoard/Category.vue")
            },
            {
                path: "/dashboard/article",
                component: () => import("../views/dashBoard/Article.vue")
            }
        ]
    },
]
 
const router = createRouter({
    history:createWebHashHistory(),
    routes,
})

export { routes, router}